﻿using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using Tulde.Core;


namespace Tulde.MP3tunes.ViewModel
{
    [JsonObject()]
    public class TrackCollection : ViewModelCollection, ICacheable
    {
        [JsonProperty("trackList")]
        public List<Track> Tracks { get; set; }

        public TrackCollection()
        {
            this.Tracks = new List<Track>();
            this.Summary = new ResultSummary();
        }
        public bool ShouldCache
        {
            get
            {
                if (this.Summary != null)
                    return this.Summary.TotalResults > 0;
                else
                {
                    return false;
                }
            }

        }
    }
}
